﻿CREATE TABLE [dbo].[tblCampaign] (
    [CampaignID]     INT           IDENTITY (1, 1) NOT NULL,
    [TransDnisID]    INT           NULL,
    [ScriptFile]     VARCHAR (100) NULL,
    [CreateDate]     SMALLDATETIME NOT NULL,
    [TurnDownDate]   SMALLDATETIME NULL,
    [CampaignTypeID] INT           NOT NULL,
    [Description]    VARCHAR (50)  NULL,
    [Subject]        VARCHAR (200) NULL,
    [MediaBuyID]     INT           NULL,
    [WebPageID]      INT           NULL
);


GO
EXECUTE sp_addextendedproperty @name = N'MS_Description', @value = N'Defines a campaign.', @level0type = N'SCHEMA', @level0name = N'dbo', @level1type = N'TABLE', @level1name = N'tblCampaign';


GO
EXECUTE sp_addextendedproperty @name = N'MS_Description', @value = N'The campaign ID', @level0type = N'SCHEMA', @level0name = N'dbo', @level1type = N'TABLE', @level1name = N'tblCampaign', @level2type = N'COLUMN', @level2name = N'CampaignID';


GO
EXECUTE sp_addextendedproperty @name = N'MS_Description', @value = N'TheTransDnis ID', @level0type = N'SCHEMA', @level0name = N'dbo', @level1type = N'TABLE', @level1name = N'tblCampaign', @level2type = N'COLUMN', @level2name = N'TransDnisID';


GO
EXECUTE sp_addextendedproperty @name = N'MS_Description', @value = N'The file used for the script', @level0type = N'SCHEMA', @level0name = N'dbo', @level1type = N'TABLE', @level1name = N'tblCampaign', @level2type = N'COLUMN', @level2name = N'ScriptFile';


GO
EXECUTE sp_addextendedproperty @name = N'MS_Description', @value = N'The date the campaign was created.', @level0type = N'SCHEMA', @level0name = N'dbo', @level1type = N'TABLE', @level1name = N'tblCampaign', @level2type = N'COLUMN', @level2name = N'CreateDate';


GO
EXECUTE sp_addextendedproperty @name = N'MS_Description', @value = N'The date the campaign was deactivated.', @level0type = N'SCHEMA', @level0name = N'dbo', @level1type = N'TABLE', @level1name = N'tblCampaign', @level2type = N'COLUMN', @level2name = N'TurnDownDate';


GO
EXECUTE sp_addextendedproperty @name = N'MS_Description', @value = N'The campaign type ID.  See codeCampaignType', @level0type = N'SCHEMA', @level0name = N'dbo', @level1type = N'TABLE', @level1name = N'tblCampaign', @level2type = N'COLUMN', @level2name = N'CampaignTypeID';


GO
EXECUTE sp_addextendedproperty @name = N'MS_Description', @value = N'Description for the campaign.', @level0type = N'SCHEMA', @level0name = N'dbo', @level1type = N'TABLE', @level1name = N'tblCampaign', @level2type = N'COLUMN', @level2name = N'Description';


GO
EXECUTE sp_addextendedproperty @name = N'MS_Description', @value = N'The subject of the campaign', @level0type = N'SCHEMA', @level0name = N'dbo', @level1type = N'TABLE', @level1name = N'tblCampaign', @level2type = N'COLUMN', @level2name = N'Subject';


GO
EXECUTE sp_addextendedproperty @name = N'MS_Description', @value = N'The MediabuyId that the campaign is linked to.', @level0type = N'SCHEMA', @level0name = N'dbo', @level1type = N'TABLE', @level1name = N'tblCampaign', @level2type = N'COLUMN', @level2name = N'MediaBuyID';

